package shape;

public class Test4 {
    public static void main2(String[] args) {
        Cycle cycle = new Cycle();
        Square square = new Square();
        Triangle triangle = new Triangle();
        Pentacle pentacle  = new Pentacle();
        Flower flower = new Flower();
        String[] shapes = {"cycle","pentacle","pentacle","flower","square","triangle","cycle"};
        for (String shape: shapes) {
            if(shape.equals("cycle")) {
                cycle.draw();
            } else if (shape.equals("square")) {
                square.draw();
            } else if (shape.equals("triangle")) {
                triangle.draw();
            } else if (shape.equals("pentacle")) {
                pentacle.draw();
            } else if (shape.equals("flower")) {
                flower.draw();
            }
        }
    }


    public static void main(String[] args) {

        Shape[] shapes = {new Cycle(),new Pentacle(),new Pentacle(),
                          new Flower(),new Square(),new Triangle(),new Cycle()
        };
        for (Shape shape: shapes) {
            shape.draw();
        }
    }
}
